- Part 0: A little bit of set up!
- Part 1: reading in manually (point and click)
- Part 2: reading in directly & working directories
- Part 3: checking data & multiple file formats
We will cover Output a bit later!
We will cover Output a bit later!
Let’s make an R Project so we can stay organized in the next steps.
Click the new R Project button at the top left of RStudio:
In the New Project Wizard, click “New Directory”:
Click “New Project”:
Type in a name for your new folder.
Store it somewhere easy to find, such as your Desktop:
You now have a new R Project folder on your Desktop!
Make sure you add any scripts or data files to this folder as we go through today’s lesson. This will make sure R is able to “find” your files.
We will review this in lab.
dasehr packageCalEnviroScreen Dataset:
CalEnviroScreen is a project that ranks census tracts in California based on potential exposures to pollutants, adverse environmental conditions, socioeconomic factors and the prevalence of certain health conditions. Data used in the CalEnviroScreen model come from national and state sources.
> File> Import Dataset> From Text (readr)> paste the url (https://daseh.org/data/CalEnviroScreen_data.csv)> click “Update” and “Import”You see a preview of the data on the top left pane.
You see a new object called CalEnviroScreen_data in your environment pane (top right). The table button opens the data for you to view.
R ran some code in the console (bottom left).